home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
utility
/
filup707.zip
/
FILUPDAT.DOC
< prev
next >
Wrap
Text File
|
1997-07-31
|
9KB
|
214 lines
FILUPDAT.DOC 1 Jul 31, 1997
WIN95 AND WINNT NOTICE: As with most DOS-based utilities, this program doesn't
understand the weird subdirectories, long filenames, invalid characters that
are possible under Windows 95 and Windows/NT. Both operating systems alias
long filenames into names like MYFILE~1.TXT and you will need to specify the
aliased versions of file names to process them. Under some file structure
systems in NT, the program may not work at all.
This program is designed to make updating of files and source code both easier
and quicker. It compares a list of files in a source directory to a list of
files in a destination directory and copies any files that are newer than the
ones found in the destination directory. This is quicker than copying all of
the files with DOS wildcard commands and cleaner than copying everything when
you only want some of the files in the destination area.
The control card file:
FILUPDAT requires an ASCII control card file to be created. The control card
file can consist of five types of records:
(1) comments: These records start with semi-colons or colons or are blank.
They are available primarily for documenting what you're doing.
(2) source directory: These records start with "-S" (or "-F" for "from")
followed by the path to copy the files from. Something like "-SC:\QB45"
works fine.
(3) destination directory: These records start with "-D" (or "-T" for "to")
followed by the path to copy the files to. For example,
"-DJ:\EBBNEW\DOCS".
(4) exclusion specification: These records start with "-X" followed by a
space and one or more filespecs (typically with wildcards). For example,
your main file specification may be "*.*" but you can exclude any
QuickBASIC source code files or object modules by including a "-X *.BAS
*.OBJ" statement.
(5) files: These records have a single file name (for example, "EBBFFILE.WP")
that is to be copied from the source directory to the destination
directory. File specifications can include standard DOS wildcards ("*" and
"?"). A comment can follow the file name provided the comment starts with
a colon or a semi-colon.
FILUPDAT.DOC 2 Jul 31, 1997
Source and destination cards can be changed throughout the control card file.
Files are copied based on the most recent source/destination card before the
file card. Changing either the source or destination will reset the exclusion
specification so you have to respecify the -X card if desired.
Also note that cards are processed sequentially. The exclusion specification
card only affects file name card(s) which occur after it.
A sample control card file might look like this:
; Sample file
-SC:\PDOX
-DJ:\EBBNEW\PRGS
CUSTOM.SC
ADDRESS.SC
ZIPCODE.SC
; Specifying another source file path; destination still the same
-SC:\MINE
NEWUSER.SC
Specifying parameters:
Parameters for this program can be set in the following ways. The last setting
encountered always wins:
- Read from an *.INI file (see BRUCEINI.DOC file),
- Through the use of an environmental variable (SET FILUPDAT=whatever), or
- From the command line (see "Syntax" below)
FILUPDAT.DOC 3 Jul 31, 1997
Syntax:
FILUPDAT { ctlfile | /Cctlfile } [ /-A ] [ /-R ] [ /CLONE ]
[ /Flist_file [ /OVERWRITE | /APPEND | /-OVERWRITE | /OVERASK ] ]
[ /FULL ] [ /ABORT | /SKIP | /CREATE ] [ /Q ]
[ /MONO ] [ /Iinitfile | /-I ] [ /-ENV ] [ /? ]
where:
"ctlfile" or "/Cctlfile" is the name of the control statement file. It can
include path information if necessary.
"/-A" says to copy files to the destination subdirectories only if a version of
the file is already there. Initially defaults to "/A".
"/A" says that a file can be added to the destination subdirectory if
necessary. This is initially the default.
"/-R" says to copy a file to the destination subdirectories only if a version
of the file is not already there. Initially defaults to "/R".
"/R" says that if a file already exists in the destination subdirectory, feel
free to replace it. This is initially the default.
"/CLONE" copies every file to the destination subdirectory, even if they
appear, on the basis of the normal date and time and size checks, to be the
same file. Initially defaults to "/-CLONE".
"/-CLONE" only copies files when there is a difference between the source file
and the destination one. This is initially the default.
"/Flist_file" says you want a text file created which tells you what files were
considered and what happened to each of them. The "list_file" is the name of
the file. This is primarily used for checking the operation of the utility.
The file name can include path information if necessary; it must contain a
period (use something like "/FTEST." if no extension is used).
"/OVERWRITE" says that if the list_file already exists, don't prompt before
overwriting it.
"/APPEND" says to append to the list_file if it already exists.
"/-OVERWRITE" says to abort if the output file exists already.
"/OVERASK" says to prompt if the output file exists already. This is the
default.
"/FULL" says to write out full comparison information in the list_file. This
is primarily for debugging purposes but it includes the numeric representation
of the date and time for both the source and destination files.
FILUPDAT.DOC 4 Jul 31, 1997
"/ABORT" says that if any source or destination subdirectory is missing, give
an error message and abort the program. This is initially the default.
"/SKIP" says that if any source or destination subdirectory is missing, give an
error message, skip all files for that specification, but otherwise continue
running the program.
"/CREATE" says that if a destination subdirectory is missing, give an error
message and try to create the subdirectory. If successful, copy the desired
files to it. If not successful, skip all files for that specification but
otherwise continue running the program. If the source subdirectory is not
found, the program will operate as if /SKIP was specified.
"/Q" turns off the file-by-file status reporting.
"/MONO" (or "/-COLOR") does not try to override screen colors. Initially
defaults to "/COLOR".
"/COLOR" (or "/-MONO") allows screen colors to be overridden. This is
initially the default.
"/Iinitfile" says to read an initialization file with the file name "initfile".
The file specification *must* contain a period. Initfiles are described in the
BRUCEINI.DOC file. Initially defaults to "/IFILUPDAT.INI".
"/-I" (or "/INULL") says to skip loading the initialization file.
"/ENV" says to look for %var% occurrences in the command line and try to
resolve any apparent environmental variable references. See BRUCEINI.DOC for
more information. This is initially the default.
"/-ENV" says to skip resolving apparent %var% occurrences in the command line.
Initially defaults to "/ENV".
"/?" or "/HELP" or "HELP" shows you the syntax for the command.
FILUPDAT.DOC 5 Jul 31, 1997
Return codes:
FILUPDAT returns the following ERRORLEVEL codes:
0 = no problems
250 = operation aborted by pressing Escape
251 = invalid control file or bad drive/subdirectory specification
252 = copy failed
253 = no files found to copy
255 = syntax problems, or /? requested
Author:
Bruce Guthrie
Room H-4885
U.S. Dept of Commerce/ESA/STAT-USA
Washington, DC 20230
voice: (202) 482-3234
e-mail: bguthrie@doc.gov
You may freely copy and re-distribute this program; however, the U.S.
Department of Commerce neither guarantees nor assures compatibility of the
program with all computer software or hardware.
Additional information about this and other Bruce Guthrie programs can be found
in the file BRUCE.DOC which should be included in the original ZIP file. The
recent change history for this and the other programs is provided in the
HISTORY.ymm file which should be in the same ZIP file where "y" is replaced by
the last digit of the year and "mm" is the two digit month of the release;
HISTORY.611 came out in November 1996. This same naming convention is used in
naming the ZIP file (FILUPymm.ZIP) that this program was included in.
Please provide an Internet e-mail address on all correspondence.